package com.spark.lola.logistics.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.spark.lola.logistics.entity.CarInfo;
import com.spark.lola.support.core.vo.SelectMap;
import com.spark.lola.support.mybatis.entity.QueryParam;
import com.spark.lola.support.mybatis.service.BaseService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author: Zhi-peng wang
 * @date: 2020/04/24 13:08
 * 车辆信息业务接口
 **/
@Transactional
public interface CarInfoService extends BaseService<CarInfo> {

    /**
     * @description: 分页查询车辆信息
     * @author: wzp
     * @date: 2020/4/24
     */
    IPage<CarInfo> findPage(QueryParam<CarInfo> queryParam);

    /**
     * @description: 查询车辆绑定状态
     * @param: id 车辆id
     * @return: int 影响行数
     * @author: wzp
     * @date: 2020/4/26
     */
    int findIsBind(long id);

    /**
     * @description: 修改绑定状态
     * @param: id 车辆id
     * @return: int 影响行数
     * @author: wzp
     * @date: 2020/4/26
     */
    int updateIsBind(int isBind, long id);

    List<SelectMap> selectMap(String key, Integer isBind);

}
